package com.chinasofti.buffered;

import java.io.*;

public class Demo02 {
    public static void main(String[] args) throws IOException {
        //字节缓冲输出流
        FileInputStream fis = new FileInputStream("D:\\视频\\录屏\\League of Legends\\League of Legends 2023.02.11 - 17.32.59.01.mp4");
//        int  by;
        byte[] by = new byte[1024];
        int len;
//        fis.read();//读取
        //by == -1;没数据
        FileOutputStream fileOutputStream = new FileOutputStream("java0419\\League of Legends 2023.02.11 - 17.32.59.01.mp4");
        while ((len = fis.read(by)) != -1){
            //将字节写入文件输出流
            fileOutputStream.write(by,0,len);
        }
        fis.close();
        fileOutputStream.close();

    }
}